//位运算
public class TestOperator04{
	public static void main(String[] args){
		int a = 7;
		int b = 8;
		System.out.println(a&b); //0
		System.out.println(a|b);//15
		System.out.println(a^b);//15
		System.out.println(~b);//-9
//移位
		int  c = 5<<2;
		System.out.println(c);//5左移两位，相当于：5*2*2
		System.out.println(40>>3);//40右移三位，相当于：40/2/2/2
}
}